package br.org.espmessenger.servidor.jpa;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class GestorJPA {
	private static final String PERSISTENCE_UNIT_NAME = "ESPMessenger2";
	private static EntityManager entityManager;
	
	static {
		EntityManagerFactory factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);
		entityManager = factory.createEntityManager();
	}

	public static EntityManager getEntityManager() {
		return entityManager;
	}
	
	
}
